﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ConvertImageToResource
{
    class Program
    {
        static void Main(string[] args)
        {
            var allFiles = Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory,"*.png");
             // <Img:BitmapImage x:Key="StorageWarningBg.png" UriSource="pack://application:,,,/Seagate.Dashboard.Resource;Component/Images/PageHome/StorageWarningBg.png" />

            string format = "<Img:BitmapImage x:Key=\"{0}\" UriSource=\"pack://application:,,,/Seagate.Dashboard.Resource;Component/Images/PageHome/{0}\" />";
            StringBuilder builder = new StringBuilder();
            foreach (var file in allFiles)
            {
                builder.AppendLine(string.Format(format, Path.GetFileName(file)));
            }
            string str = builder.ToString();
            File.WriteAllText("a.txt", str);
        }
    }
}
